package com.trisan;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Repository;

@Repository("deptDAO")
public class DeptDAO {
	
	@Autowired
	HibernateTemplate hibernateTemplate;
	
	
	//method to get department id's
	
	public List<Dept> getDepts(){
	
		List<Dept> s;
		s=hibernateTemplate.find("from com.trisan.Dept d");
	/**	s=new String[l.size()];
		int i=0;
		for(Object e:l){
			String s1=(String)e;
			s[i]=s1;
			i=i+1;
		}*/
		return s;
	}

}
